﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.DomainServices.Server;
using System.ServiceModel.DomainServices.Hosting;

namespace Imtihan.Web
{
    public partial class ImtihanDomainService
    {
        /// <summary>
        /// Get user assessment schedules by passing assessment schedule id.
        /// </summary>
        /// <param name="assessmentScheduleId">assessment schedule id.</param>
        /// <returns>List of user assessment schedule for specific assessment schedule.</returns>
        //[Invoke]
        public List<Question> GetQuestionSortedBySentence()
        {
            var questions = from entities in this.ObjectContext.Questions
                          orderby entities.Sentence
                          select entities;

            return questions.ToList();
        }
    }
}